package de.fhd.pms.ctrl;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * The Admin Controller class. Its tasks:
 * <ul>
 * <li>read and verify the parameters</li>
 * <li>access to the objects of the system</li>
 * <li>selection of the view and provision of content for the view</li>
 * </ul>
 * 
 * @author Josef Fischer
 * @author Alexander Neetzel
 * @author Philipp Six
 * 
 */

@Controller
public class AdminController {

	private static Logger log = Logger.getLogger(HomeController.class);

	/**
	 * Custom handler for the admin-home view. Note that this handler relies on
	 * the RequestToViewNameTranslator to determine the logical view name based
	 * on the request URL: "/index.html"
	 * 
	 * @return View name "admin-home" selecting view "/view/admin-home.jsp"
	 */
	@RequestMapping("/Admin.html")
	public ModelAndView edit() {
		log.info("welcome");
		ModelAndView mv = new ModelAndView();
		mv.addObject("title", "Servicebereich");
		mv.addObject("message1", "");
		mv.setViewName("admin-home");
		return mv;
	}

}